package cn.itcast.nems.studentrecord.service.settlement;

import cn.itcast.nems.studentrecord.constant.ReferenceTypeEnum;

/**
 * @author liyong
 * create: 2023-11-15 16:30:21
 **/
public class SettlementCalculatorRenewal extends DefaultSettlementCalculator {

    public SettlementCalculatorRenewal() {
        super(null, ReferenceTypeEnum.RENEWAL);
    }

    public SettlementCalculatorRenewal(SettlementResult originSettlementResult) {
        super(originSettlementResult, ReferenceTypeEnum.REPEAT);
    }

    @Override
    int doCalSettlementAmount(SettlementData settlementData, int serviceDays, int settlementDays) {
        return settlementData.getActualAmountDue();
    }

    @Override
    int calTransferOutAmount(SettlementData settlementData, int settlementAmount) {
        return 0;
    }

    @Override
    public boolean isRenewal() {
        return true;
    }
}
